﻿<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <title>通知公告详情-精工云MES系统移动端</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link href="/JG/Content/jquery/weui/style/weui.min.css" rel="stylesheet" />
    <link href="/JG/Content/jquery/jquery-weui/css/jquery-weui.min.css" rel="stylesheet" />
    <link href="/JG/Content/css/bootstrap.min.css" rel="stylesheet" />
    <link href="/JG/Content/css/Global.css" rel="stylesheet" />
    <link rel="stylesheet" href="/JG/Content/css/AnnouncementDetail.css?v=1">
    <script src="/JG/Content/LocalConfigs.js?v=1"></script>
    <script src="/JG/Content/LocalUserInfo.js"></script>
</head>

<body>
    <!--title部分-->
    <header class="header">
        <div class="empty"></div>
        <div class="header_title">
            <a href="javascript:;">通知公告详情</a>
        </div>
        <div class="item item2">
            <div class="user_img" onclick="javascript:location.href='/JG/Features/AnnouncementList.html'">
                <span class="back"><img src="/JG/Content/images/return.png" alt=""></span>
            </div>
        </div>
    </header>


    <div id="MainPage">
        <div class="panel  panel-success">
            <div class="panel-heading">通知类型</div>
            <div class="panel-body">
                {{AnnouncementDetail.NotieType}}
            </div>
            <div class="panel-heading">通知内容</div>
            <div class="panel-body">
                {{AnnouncementDetail.Content}}
            </div>
            <div class="panel-footer" style="text-align:right">通知时间：{{AnnouncementDetail.NotieTime}}</div>
            <div class="panel-footer" style="text-align:center;background-color:white;">
                <button type="button" class="btn btn-success" v-on:click="EnterRead()">确认</button>
            </div>
        </div>
    </div>


    <script src="/JG/Content/jquery/jquery-3.2.1.min.js"></script>
    <script src="/JG/Content/jquery/jquery-weui/js/jquery-weui.min.js"></script>
    <script src="/JG/Content/Utils.js"></script>
    <script src="/JG/Content/vue-v2.34.js"></script>
    <script type="text/javascript">
        window.onload=function(){
            // var BodyHeight=$(document.body).outerHeight(true);
            // var BodyHeight4=$(document.body).height();
            // var BodyHeight2=window.innerHeight;
            var BodyHeight=$(window).height();
            console.log(BodyHeight);
            var MainPageHeight=BodyHeight-90;
            console.log(MainPageHeight);
            //赋值给div
            $("#MainPage").height(MainPageHeight);
        }

        var vmPage = new Vue({
            el: "#MainPage",
            data: {
                AnnouncementDetail: {
                    NotieType: "",
                    Content:"",
                    NotieTime:""
                },
                DetailID:$.getUrlParam("ID")
            },
            mounted: function () {
                var currSelf = this;
                var url=LocalConfig.SrvPath + "/jgmes/jgmesNoticeAction!getNoticeById.action";
                //currSelf.initData();

                $.ajax({
                    type:"post",
                    url:url,
                    data:{
                        noticeId:currSelf.DetailID
                    },
                    datatype:"json",
                    success:function(result){
                        var data = JSON.parse(result);
                        var DetailData = ReturnData(data);
                        console.log(DetailData);
                        if (DetailData.IsSuccess) {
                            currSelf.AnnouncementDetail.NotieType = DetailData.Data.NOTICE_NOTICETYPE_NAME;
                            currSelf.AnnouncementDetail.Content = DetailData.Data.NOTICE_CONTEXT;
                            currSelf.AnnouncementDetail.NotieTime = DetailData.Data.SY_CREATETIME;
                        }
                    },
                    error: function (XMLHttpRequest, textStatus, errorThrown) {
                         alert("请求失败" + errorThrown);
                     },
                    complete: function () {
                         $.hideLoading();
                    }
                });
            },
            EnterRead: function () {
                var currSelf = this;
            }
        });
    </script>
</body>

</html>